package com.ruoyi.student.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.student.api.domain.SysStudent;
import com.ruoyi.student.api.factory.RemoteStudentFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

import java.util.List;


/**
 * 远程学生服务
 *
 * @author xsw
 * @date 2024/03/23
 */
@FeignClient(contextId = "remoteStudentService",
        value = ServiceNameConstants.STUDENT_SERVICE, fallbackFactory = RemoteStudentFallbackFactory.class)
public interface RemoteStudentService {

    /**
     * 查询学生管理列表
     */
    @GetMapping("/student/lists/{classId}")
    TableDataInfo getStudentByClassId(@PathVariable("classId") Long classId);

    /**
     * 查询所以未就业学生
     * @return
     */
    @GetMapping("/student/lists/unemployedStudentList")
    TableDataInfo unemployedStudentList();

    /**
     * 根据学生id修改学生状态
     */
    @PutMapping("/student/changeStatusById/{studentId}")
    AjaxResult changeStatusById(@PathVariable("studentId") Long studentId);
    @GetMapping("/student/lists/getStudentList")
    List<SysStudent> getStudentList();
}
